package net.jlnx.Uebung5_2.data;

public class Ellipse extends FigMZLA {

	public Ellipse(int posX, int posY, int posZ, int a, int b) {
		super(posX, posY, posZ, a, b);
		super.figurenTyp = "Ellipse";
	}

	@Override
	public double berechneFlaeche() {
		double flaeche = super.A * super.B * Math.PI;
		return flaeche;
	}

	@Override
	public int compareTo(FigMZLA o) {
		int compare = 0;

		if (this.berechneFlaeche() < o.berechneFlaeche())
			compare = -1;
		if (this.berechneFlaeche() > o.berechneFlaeche())
			compare = 1;

		return compare;
	}
}